package com.bite.messageQueue.common;

import java.io.Serializable;

/**
 * 表示返回值
 */
public class BasicReturns implements Serializable{
    //用来标识唯一请求和响应
    protected String rid;
    //用来标识唯一的channel
    protected String channelId;
    //用来表示当前远程调用方法的返回值
    protected boolean ok;

    public BasicReturns() {
    }

    public BasicReturns(String rid, String channelId) {
        this.rid = rid;
        this.channelId = channelId;
    }

    public BasicReturns(String rid, String channelId, boolean ok) {
        this.rid = rid;
        this.channelId = channelId;
        this.ok = ok;
    }

    /**
     * 获取
     * @return rid
     */
    public String getRid() {
        return rid;
    }

    /**
     * 设置
     * @param rid
     */
    public void setRid(String rid) {
        this.rid = rid;
    }

    /**
     * 获取
     * @return channelId
     */
    public String getChannelId() {
        return channelId;
    }

    /**
     * 设置
     * @param channelId
     */
    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String toString() {
        return "BasicReturns{rid = " + rid + ", channelId = " + channelId + "}";
    }

    /**
     * 获取
     * @return ok
     */
    public boolean isOk() {
        return ok;
    }

    /**
     * 设置
     * @param ok
     */
    public void setOk(boolean ok) {
        this.ok = ok;
    }
}
